package com.mjt.dongbao.ums.entity.dto;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * @Description
 * @Author mjt
 * @Time 2021/12/29
 */

@Data
@ToString
public class UmsMemberRegisterParamDTO {

    // 要求校验 username 长度在1~8之间
    @Size(min = 1, max = 8, message = "用户名长度要在 1~8 之间")
    @NotEmpty(message = "用户名不能为空")
    private String username;

    // 要求校验密码长度在 3~8
    @Size(min = 3, max = 8, message = "密码长度要在 3~8 之间")
    @NotEmpty(message = "密码不能为空")
    private String password;

    private String icon;

    // 要求校验为邮箱格式
    @Email()
    private String email;

    @Size(min = 1, max = 8)
    private String nickName;

}
